package com.xuwang.mapper;

import com.xuwang.pojo.Comment;
import com.xuwang.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (User)表数据库访问层
 *
 * @author smallseven
 * @since 2021-08-31 15:29:53
 * @version 1.0
 */
@Repository
public interface PublicInfoMapper {



    int register(User user);

    User login(User user);

    int saveToken(@Param("username") String username,@Param("token") String token);

    int updateCode(@Param("phone") String phone,@Param("code") int code);

    int findThisPhone( String phoneNum);

    int updateUserImg(@Param("username") String username,@Param("src") String src);

    int updateUserInfo(User user);

    int insertManyUser(@Param("userList") List<User> userList);

    User checkUserName(String userName);

    int deleteManyUser(@Param("ids")Integer[] ids);

    int addComment(Comment comment);
}
